//
//  shoucang.m
//  HYHoney
//
//  Created by dllo on 16/3/1.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "shoucang.h"
#import "UIImageView+WebCache.h"
#import "ModelForPush.h"
#import "DKNightVersion.h"

@implementation shoucang


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.imageForSave = [[UIImageView alloc]init];
        [self.contentView addSubview:self.imageForSave];
        
        self.labelForTitle =[[UILabel alloc]init];
        [self.contentView addSubview:self.labelForTitle];

    }
    
    return self;

}


- (void)layoutSubviews{
    [super layoutSubviews];
    
    self.imageForSave.frame = CGRectMake(10, 10,100, 100);
    
    self.labelForTitle.frame = CGRectMake(120, 30, self.frame.size.width - 130, 50);
    
}

- (void)passModel:(ModelForPush *)model{
    
    [self.imageForSave sd_setImageWithURL:[NSURL URLWithString:model.cover_image_url] placeholderImage:[UIImage imageNamed:@"jzz"]];
    
    self.labelForTitle.text = model.title;
    self.labelForTitle.numberOfLines = 0;
    self.labelForTitle.dk_textColorPicker = DKColorWithRGB(0x000000, 0xefffff);
    
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
